Apparatus and method for recording and reproducing data, and AV server

ABSTRACT

A data recording and reproducing apparatus ( 11 ) which generates a plurality of divided data through dividing input data D 1  using a distributor ( 22 ) if recording data, while generating redundancy-code data P 1  and P 2  using Read-Solomon-code data which can perform error-correcting on a plurality of divided data, and records the divided data and the redundancy-code data P 1 , P 2  on HDDs  21   1  to  21   K   , 28   1  and  28   Z . The data recording and reproducing apparatus ( 11 ) reproduces the divided data and the redundancy-code data from the HDDs  21   1  to  21   K   , 28   1  and  28   Z , performs error-correcting processing on the divided data based on the redundancy-code data by an error corrector ( 31 ), and outputs the divided data which have been error-corrected after multiplying the divided data by a data multiplier ( 32 ) if reproducing data.

TECHNICAL FIELD

The invention relates to an apparatus and a method for recording andreproducing data including video data and audio data, and AV (audiovideo) server.

BACKGROUND ART

In recent years, following multi-channeling of providing informationowing to the familiarization of CATV (cable television) or the like, ademand for reproducing a plurality of visual/audio data simultaneouslyfrom a single data recording and reproducing apparatus, unlike VTRs(video tape recorder), has become higher. In order to satisfy thisdemand, a data recording and reproducing apparatus called a video serverwhich records and reproduces visual/audio data using a random accessiblerecording and reproducing medium such as a hard disk is coming into wideuse.

In general, a video server used in, for example, a broadcasting stationis required to have a high transfer rate of data to be sent forobtaining high qualities of visual and audio, and a large capacitance torecord data for a long period of time. Therefore, it has been tried toacquire a higher transfer rate of data and a larger capacitance by usinga data recording and reproducing apparatus comprising a plurality ofhard disk (HD in the followings) drives which can perform accumulationof visual and audio data, and parallel processing. Further, it has beentried to record parity data so as to ensure the reliability even if anyof the HD drives accidentally breaks down. As a result, even in a casewhere different numbers of channels are requested due to contents orbroadcasting systems of programs provided by a broadcasting station, itis possible to implement a multi-channel video server applicable to avariety of usage patterns, for example, establishing NVOD (near video ondemand) systems by separately recording a plurality of material data andtransmitting them through multi-channel simultaneously, or byreproducing the identical material data with a time-lag throughmulti-channel.

In a data recording and reproducing apparatus used in such amulti-channal video server, RAID (Redundant Arrays of Inexpensive Disks)technique proposed in the article presented by Patterson and some othersin 1988, is used. In the article, the RAID is classified into five:RAID-1 to RAID-5. The typical ones among them are the RAID-1, the RAID-3and the RAID-5. The RAID-1 is a method of writing the same contents ontwo HDDs.

The RAID-3 is a method of recording input data on a plurality of HDDs bydividing the data at a specific length, while generating parity data andwriting them on another HDD.

FIG. 11 is a block diagram showing an example configuration of a datarecording and reproducing apparatus using the RAID-3. This datarecording and reproducing apparatus 101 comprises: a plurality of harddisk drives (referred as HDDs in the followings) 102 ₁ to 102 _(N) (N isan integer of 2 or more); an HDD 109 for recording parity data P asredundancy-code data; a data distributor 106 for generating a pluralityof divided data by dividing input data D_(I) at a specific length andfor distributing each of the divided data to each of the HDDs 102 ₁ to102 _(N); a parity generator 107 for generating parity data P from thedivided data outputted from the data distributor 106; input memories 104₁ to 104 _(N) for temporarily keeping each divided data outputted fromthe data distributor 106; input memory 108 for temporarily keeping theparity data P outputted from the parity generator 107; controllers 103 ₁to 103 _(N) and 110, which are respectively connected to the HDDs 102 ₁to 102 _(N) and 109, for controlling recording the data kept by theinput memories 104 ₁ to 104 _(N) and 108 on the HDDs 102 ₁ to 102 _(N)and 109, and for controlling reproducing data from the HDDs 102 ₁ to 102_(N) and 109; output memories 105 ₁ to 105 _(N) and 111 for temporarilykeeping data read out from each of the HDDs 102 _(1 to 102) _(N) and109; an error corrector 112 for restoring the divided data by detectingand correcting errors based on the data kept by the output memories 105₁ to 105 _(N) and 111 and on error information which is described later;a data multiplier 113 for outputting the output data DO obtained bymultiplying the output data from the error corrector 112; and a CPU 114for controlling the whole apparatus.

Next, the data-writing operation of the data recording and reproducingapparatus 101 will be described. The input data D_(I) is inputted to thedata distributor 106, and a plurality of divided data are generated.Each of the divided data is distributed to be recorded on the inputmemories 104 ₁ to 104 _(N). It is also inputted to the parity generator107. At this time, data may be distributed in order in the followingmanner: provided that, for example, the data are arranged in data linesD1, D2, D3, D4, D5, with a unit of bit or byte, the data D1 isdistributed to the first HDD 102 ₁, the data D2 is distributed to thesecond HDD 102 ₂, and so forth, and if the data DN is distributed to thelast HDD 102 _(N), data is distributed in order to the HDDs beginning atthe first HDD 102 ₁ again.

The parity generator 107 generates the parity data P based on thedivided data outputted from the data distributor 106 and outputs it. Theinput memory 108 temporarily records the parity data P. Then, thecontrollers 103 ₁ to 103 _(N) and 110 of the HDDs 102 ₁ to 102 _(N) andrespectively 109 read out the divided data and the parity data P fromthe input memories 104 ₁ to 104 _(N) and 108 under the control of theCPU 114, and writes the data on the HDDs 102 ₁ to 102 _(N) and 109respectively.

Next, the data-reading-out operation of the data recording andreproducing apparatus 101 will be described. Each of the controllers 103₁ to 103 _(N) and 110 reads out the divided data and the parity data Pfrom the HDDs 102 ₁ to 102 _(N) and 109 respectively, and writes them onthe output memories 105 ₁ to 105 _(N) and 111 respectively. At thistime, if an error of data-reading-out operation (referred as reading-outerror in the followings) occurs in the HDDs 102 ₁ to 102 _(N) and 109,error information indicating that an error has occurred is sent to thecontrollers 103, to 103 _(N) and 110 as status data from the controlsection in the HDDs 102 ₁ to 102 _(N) and 109. Then, the errorinformation is sent to the CPU 114 as error information ER₁ to Er_(N)and Er_(p) from the controllers 103 ₁ to 103 _(N) and 110.

Each of the data recorded on the output memories 105 ₁ to 105 _(N) and111 is synchronized and outputted to the error corrector 112. At thistime, if the reading-out error occurs, error information showing that anerror has occurred is sent to the error corrector 112 from the CPU 114.The error information includes information for identifying the HDD inwhich the reading-out error has occurred. The error corrector 112restores the divided data based on the error information and the paritydata P and outputs the divided data to the data multiplier 113. Data canbe restored by the error corrector 112 only when reading-out errors haveoccurred in one HDD. When reading-out errors have occurred in aplurality of HDDs, the error corrector 112 can detect the errors but cannot restore the data. The data multiplier 113 rearranges the divideddata outputted from the error corrector 112 in the original data lineand outputs it outside as the output data D_(O).

In contrast, in the RAID-5, a unit(block) of dividing data is madelarger and one divided data is recorded as a data block on one HDD,while exclusive OR (parity data) of the data blocks which correspond toone another and are recorded on the HDDs is calculated and the result isrecorded as a parity block on another HDD. The parity block is thusdistributed to all the HDDs.

FIG. 12 is a block diagram showing a configuration example of a datarecording and reproducing apparatus using the RAID-5. This datarecording and reproducing apparatus 201 comprises: a plurality of HDDs202 ₁ to 202 _(N) (N is an integer of 2 or more) for recording inputdata; a parity generator-cum-error corrector 212 for generating paritydata based on the input data D_(I) and the data recorded on the HDDs 202₁ to 202 _(N), while restoring the data by correcting the error based onthe data read out from each of the HDDs 202 ₁ to 202 _(N) and the errorinformation; input memories 204 ₁ to 204 _(N) for temporarily keepingthe output data of the parity generator-cum-error corrector 212;controllers 203 ₁ to 203 _(N), which are connected to the HDDs 202 ₁ to202 _(N) respectively, for controlling the operation of recording thedata kept by the input memories 204 ₁ to 204 _(N) on the HDDs 202 ₁ to202 _(N) and the operation of reproducing the data from the HDDs 202 ₁to 202 _(N); output memories 205 ₁ to 205 _(N) for temporarily keepingthe data read out from the IHDDs 202 ₁ to 202 _(N) respectively; and aCPU 214 for controlling the whole apparatus. Further, if an error ofdata-reading-out operation occurs in any of the HDDs 202 ₁ to 202 _(N),error information indicating that an error has occurred is sent tocontrollers 203 ₁ to 203 _(N) as status data from the control section inthe HDDs 202 ₁ to 202 _(N). Further, the error information are sent tothe CPU 214 as error information ER₁ to Er_(N) from the controllers 203₁ to 203 _(N).

Next, the data-writing operation of the data recording and reproducingapparatus 201 will be described. For example, if writing the data D ontoan address A in the HDD 202 ₁, the CPU 214 controls the controllers 203₁ and 203 ₂ to read out the recorded data D₁ from the HDD 202 ₁ and soas to read out the parity data P from the HDD 202 ₂, provided that theparity data P corresponding to the data D is recorded on the HDD 202 ₂.At this time, the parity generator-cum-error corrector 212 calculatesexclusive OR of the data D₁ and the parity data P, and restores paritydata P₁ without the data D₁. Then, the parity generator-cum-errorcorrector 212 calculates exclusive OR of the data D and the parity dataP₁ to obtain another parity data D₂. The CPU 214 controls thecontrollers 203 ₁ 1and 203 ₂ to write the data D onto the HDD 202 ₁ andto write the parity data P₂ onto the HDD 202 ₂.

Next, the data-reading-out operation of the data recording andreproducing apparatus 201 will be described. For example, if reading outthe data D from the address A in the HDD 202 ₂, the CPU 214 controls thecontroller 203 ₁ to read out the data D from the HDD 202 ₁. At thistime, if the reading-out error does not occur, the CPU 214 controls theparity generator-cum-error corrector 212 to output the data D read outfrom the HDD 202 ₁ as the output data D_(O) through the output memory205 ₁ and the parity generator-cum-error corrector 212. At this time, noparticular processing is performed in the parity generator-cum-errorcorrector 212.

On the other hand, if data in the data recording and reproducingapparatus 201 is not read out normally, that is, if the data D can notbe read out from the address A in the HDD 202 ₁ because of a defectivesector or the like, the CPU 214 receives the error information ER₁ fromthe controller 203 ₁. In such a case, the CPU 214 reads out data fromthe corresponding addresses in other HDDs 202 ₂ to 202 _(N), send themto the parity generator-cum-error corrector 212 and controls the paritygenerator-cum-error corrector 212 to reproduce the data D based on theabove-mentioned data to output them as the output data D_(O).

As described, if writing input data in the data recording andreproducing apparatus 201 using the RAID-5, the number of accessincreases since reading out and writing the data block, and reading outand writing the parity block are required to be performed. Further, ifan error occurs if reading out data, the data is restored by reading outdata from another HDD so that the number of access also increases.Accordingly, the data recording and reproducing apparatus 201 using theRAID-5 is fit for use in a random access processing of logical blocks ofa specific size, but not in a processing which requires a real-timeoperation.

In contrast, in the data recording and reproducing apparatus 101 usingthe RAID-3, input data can be written by one access, anderror-correction after reading out data can be immediately performed.Accordingly, the data recording and reproducing apparatus 101 using theRAID-3 is fit for use in a processing for recording and reproducing datawith high-speed. Therefore, a data recording and reproducing apparatususing the RAID-3 is suitable for a device such as a multi-channel videoserver which requires a real-time operation.

In the above-mentioned data recording and reproducing apparatus usingthe RAID-3, however, data can be restored only when reading-out errorshave occurred in one HDD. This causes a problem that the apparatusbecomes incapable of error detection and correction of data if any ofthe HDDs breaks down.

Moreover, in the data recording and reproducing apparatus using theRAID-3, if one of the HDDs reads out invalid data without an reading-outerror being generated, it is impossible to obtain information indicatingwhich HDD has read out the invalid data, although it is possible todetect the error of data. This results in a problem that data can not berestored.

The data recording and reproducing apparatus using the RAID-3 hasanother problem that data can not be restored if two or more HDDs breakdown, although it is possible to detect the error of data.

Furthermore, when an error (referred as writing error in the followings)occurs during the writing operation in any of the HDDs in the datarecording and reproducing apparatus, it is necessary to restore the datain which the writing error occurred. This data-restoring processingperformed on part of the recording region of the recording medium (harddisk) is called a portion-rebuild processing (Portion Rebuild) in thisapplication. On the other hand, if any of the HDDs in the datarecording, and reproducing apparatus is replaced, it is necessary torebuild the original data on the new HDD. This data-restoring processingperformed on the whole recording region of the recording medium (harddisk) is called a whole-rebuild processing (Whole Rebuild) in thisapplication. In the followings, the data-restoring-processing operationin the data recording and reproducing apparatus 101 using the RAID-3shown in FIG. 11 will be described.

First, the operation of the Portion Rebuild will be described. The CPU114 stores the HDD and the address (sector) in which the writing errorshave occurred, and the Portion Rebuild is performed on the HDD and theaddress. In the Portion Rebuild, first, the CPU 114 controls each of thecontrollers 103 ₁ to 103 _(N) and 110 to perform the reading-outoperation, appointing the address on which the Portion Rebuild is to beperformed. In response, the controllers 103 ₁ to 103 _(N) and 110 readout the data in the appointed address from the HDDs 102 ₁ to 102 _(N)and 109 respectively. The read-out data is inputted to the errorcorrector 112 through the output memories 105 ₁ to 105 _(N) and 111. Atthis time, the CPU 114 gives a command for the error corrector 112 notto use the data read out from the HDD on which the Portion Rebuild is tobe performed. The error corrector 112 restores the divided data usingthe data outputted from the output memories 105 ₁ to 105 _(N) and 111except the data read out from the HDD on which the Portion Rebuild is tobe performed, and outputs the divided data which has been restored tothe data multiplier 113. The data multiplier 113 rearranges the divideddata outputted from the error corrector 112 in the original data line,and outputs it as the output data D_(O). Next, under the control of theCPU 114, the output data D_(O) is inputted from the data multiplier 113to the data distributor 106. The restored divided data is written ontothe HDD on which the Portion Rebuild is to be performed by performingthe same writing operation as the writing operation of input data D_(I),and the Portion Rebuild is ended.

Next, the operation of the Whole Rebuild will be described. If apredetermined HDD is replaced and the superior device issues a commandfor the data recording and reproducing apparatus 101 to perform theWhole Rebuild, the CPU 114 makes the controllers 103 ₁ to 103 _(N) and110 perform the reading-out operation upon receiving the command. Inresponse, the controllers 103 ₁ to 103 _(N) and 110 read out data fromthe HDDs 102 ₁ to 102 _(N) and 109 respectively. The read-out data isinputted to the error corrector 112 through the output memories 105 ₁ to105 _(N) and 111. At this time, the CPU 114 gives a command for theerror corrector 112 not to use the data read out from the HDD on whichthe Whole Rebuild is to be performed. The error corrector 112 restoresthe divided data using the data outputted from the output memories 105 ₁to 105 _(N) and 11 ₁ except the data read out from the HDD on which theWhole Rebuild is to be performed, and outputs the divided data which hasbeen restored to the data multiplier 113. The data multiplier 113rearranges the restored divided data outputted from the error corrector112 in the original data line, and outputs it as the output data D_(O).Next, under the control of the CPU 114, the output data D_(O) isinputted from the data multiplier 113 to the data distributor 106. Therestored divided data is written onto the HDD on which the Whole Rebuildis to be performed by performing the same writing operation as thewriting operation of input data D_(I). The processing described above isperformed on the whole recording region of the hard disk.

In both cases of the Portion Rebuild and the Whole Rebuild describedabove, however, data-restoring during the rebuild processing can beperformed only if the correct data has been read out in all the HDDsexcept for the HDD on which the rebuild processing is to be performed.If a writing error occurs even in one of the other HDDs than the HDD onwhich the rebuild processing is to be performed, the error can bedetected in the error corrector 112 but data can not be restored. Thatis, the data recording and reproducing apparatus 101 using the RAID-3has a problem that data can not be restored if another trouble occurssince the apparatus is incapable of detecting errors and correcting ofdata during the rebuild processing.

In the meantime, a plurality of tracks are provided on a hard disk in aconcentric circular pattern. A plurality of sectors, which are recordingunit of data, are provided by dividing the tracks in a radial pattern.There may be a case where these sectors include sectors in which errorsalways occur at the time of writing or reading out data. Such sectorsare called defective sectors. Defective sectors are considered to be inconditions in which reading out or writing data can not be correctlyperformed because of physical damage or the like. In case that thereshould be defective sectors, spare sectors may be provided on the harddisk so that data can be recorded on the spare sectors instead of thedefective sectors if necessary. Such a spare sector is called asubstitute sector. In the HDD having substitute sectors, the controlsection in the HDD includes a correspondence table showing thecorrespondence between logical sector numbers (LBA) and physical sectornumbers so that the substitute sectors used instead of the defectivesectors can be referred by the same sector number as the defectivesectors from the superior devices. Accordingly, if there is a defectivesector, a re-allotting processing (Reassign), in which thecorrespondence between LBA and the physical sector number in therecording region on the hard disk is changed, is to be performed.

The Reassign requires relatively long time (several seconds). Therefore,in general, it is not performed during the operation of a data recordingand reproducing apparatus of the related art. In an apparatus whichrequires a real-time operation such as a multi-channel video server,however, it is desirable that the Reassign should be performed evenduring the operation of the apparatus, since stopping the operation ofthe apparatus because of the Reassign can be very inconvenient.

As described in the followings, the Reassign may also be performedduring the operation of the data recording and reproducing apparatus. Inthe followings, the operation of the Reassign if performed during theoperation of the data recording and reproducing apparatus 101 using theRAID-3 shown in FIG. 11 will be described.

If the superior device gives a command for the data recording andreproducing apparatus 101 to perform the Reassign, the CPU 114, uponreceiving the command, suspends the writing operation and thereading-out operation on/from the HDD on which the Reassign is to beperformed. Next, the CPU 114 makes the Reassign be performed on the HDDon which the Reassign is to be performed, appointing the sector on whichthe Reassign is to be performed. The Reassign is, as described, tochange the correspondence between LBA and the physical sector number. Ifthe CPU 114 receives a command to perform writing, during the Reassign,it makes the writing operation be performed on the HDDs except the HDDon which the Reassign is to be performed while storing the HDD on whichthe Reassign is to be performed and LBA onto which writing is to beperformed according to the command. If the CPU 114 receives a command toperform reading-out, during the Reassign, it makes the reading-outoperation be performed on the HDDs other than the HDD on which theReassign is to be performed, and gives a command for the error corrector112 to perform the error correction voiding the data from the HDD onwhich the Reassign is to be performed. If the Reassign is completed, theCPU 114 cancels the suspension of the writing operation and thereading-out operation onto/from the HDD on which the Reassign has beenperformed.

After the Reassign is performed as described, it is necessary to restorethe data recorded on the HDD and the address on which the Reassign hasbeen performed, and the data recorded on the HDD and the address whichhave been stored during the suspension of the writing operation in theprocess of the Reassign. This restoring processing of data is describedabove.

Accordingly, the data recording and reproducing apparatus blusing theRAID-3 becomes incapable of detecting and correcting errors of dataduring the Reassign. It is, therefore, difficult to perform the Reassignduring the operation of the apparatus without a considerable decrease inthe reliability of the apparatus.

Incidentally, a method in which the RAID-5 is expanded is proposed asintroduced in the document “The latest secondary storage: Disk array: byKIRENGAWA” (Information Processing, Vol.34, No.5, pp.642-651, Publishedin May, 1993). This is a method in which two parity blocks based onRead-Solomon coding are provided to be able to cope with troubles in twoHDDs at most within a parity group.

In the method in which the RAID-5 is expanded, the number of the accessincreases compared to that of the RAID-5 when errors occur at the timeof writing input data or reading out data. The method is, therefore, notsuitable for a processing which requires the real-time operation anymore than the RAID-5 is. Accordingly, it is difficult to use theabove-mentioned method in which the RAID-5 is expanded in the apparatuswhich requires a real-time operation such as a multi-channel videoserver.

In addition, in a regular data recording and reproducing apparatus usinga plurality of the HDDs, the data-restoring processing such as the WholeRebuild or the Portion Rebuild as described is performed fevernecessary, and it is impossible to access the data recording andreproducing apparatus from outside during the restoring processing. Thisis a disadvantage of the apparatus which requires a real-time operationsuch as a multi-channel video server since stopping the operation of theapparatus because of the data-restoring processing can be veryinconvenient.

DISCLOSURE OF THE INVENTION

The invention is designed to overcome the foregoing problems. The firstobject of the invention is to provide an apparatus and a method forrecording and reproducing data, and an AV server which are excellent inability to detect and correct errors of data and are suitable for aprocessing which requires a real-time operation.

The second object of the invention is to provide an apparatus and amethod for recording and reproducing data, and an AV server which candetect and correct errors of data even during the data-restoringprocessing and are suitable for a processing which requires a real-timeoperation.

The third object of the invention is to provide an apparatus and amethod for recording and reproducing data, and an AV server which aremade to be able to perform the data-restoring operation withoutinterrupting the operation of recording and reproducing data, inaddition to the above-mentioned second object.

The fourth object of the invention is to provide an apparatus and amethod for recording and reproducing data, and an AV server which aremade to be able to perform error-detection and correction of data evenduring the re-allotting processing so that it can perform there-allotting processing without interrupting the operation of recordingand reproducing data, and are suitable for a processing which requires areal-time operation.

The fifth object of the invention is to provide an apparatus and amethod for recording and reproducing data, and an AV server which canperform error detection and correction of data also in thedata-restoring processing after the re-allotting processing, in additionto the fourth object.

A data recording and reproducing apparatus of the invention comprises:means for recording and reproducing divided data for recording aplurality of divided data obtained through dividing input data by apredetermined unit on a first non-linear accessible recording medium,while reproducing the divided data recorded on the first recordingmedium; and means for recording and reproducing error-correcting-codedata for generating a plurality of error-correcting-code data for thedivided data to record the error-correcting-code data on a secondnon-linear accessible, while reproducing the error-correcting-code datarecorded on the second non-linear accessible recording medium.

In the data recording and reproducing apparatus of the invention, aplurality of divided data obtained through dividing input data by apredetermined unit are recorded on first non-linear accessible recordingmedia, and the divided data recorded on the first recording media arereproduced by the means for recording and reproducing divided data. Inaddition, a plurality of the error-correcting-code data for the divideddata is generated to be recorded on second non-linear accessiblerecording media while the error-correcting-code data recorded on thesecond non-linear accessible recording media are reproduced by the meansfor recording and reproducing error-correcting-code data.

An AV server of the invention comprises: a plurality of input/outputprocessing means for converting data including visual and audio datainputted form outside to data which can be recorded on a non-linearaccessible recording medium, while outputting the data outputted fromthe recording medium after converting the data to data which can beoutputted outside; means for recording and reproducing divided data forrecording a plurality of divided data obtained through dividing dataoutputted from each of the input/output processing means on a firstnon-linear accessible recording medium, while reproducing the divideddata recorded on the first non-linear accessible recording medium; andmeans for recording and reproducing error-correcting-code data forgenerating a plurality of error-correcting-code data for the divideddata to record the error-correcting-code data on a second non-linearaccessible recording medium while reproducing the error-correcting-codedata recorded on the second non-linear accessible recording medium.

In the AV server of the invention, data including visual and audio datainputted from outside is converted to the data which can be recorded onnon-linear accessible recording media, and the data outputted from therecording media is outputted after being converted to the data which canbe outputted outside by a plurality of input/output processing means. Aplurality of divided data obtained through dividing data outputted fromeach of the input/output processing means are recorded on firstnon-linear accessible recording media, while the divided data recordedon the first non-linear accessible recording media are reproduced by themeans for recording and reproducing divided data. In addition, aplurality of error-correcting-code data for the divided data aregenerated to be recorded on second non-linear accessible recording mediawhile the error-correcting-code data recorded on the second non-linearaccessible recording media are reproduced by the means for recording andreproducing error-correcting-code data.

A method of recording and reproducing data of the invention includes: afirst step of recording a plurality of divided data obtained throughdividing input data by a predetermined unit on a first non-linearaccessible recording medium, while generating a plurality oferror-correcting-code data for the divided data to record theerror-correcting-code data on a second non-linear accessible recordingmedium; and a second step of reproducing the divided data recorded onthe first non-linear accessible recording medium in the first step,while reproducing the error-correcting-code data recorded on the secondnon-linear accessible recording medium.

Another data recording and reproducing apparatus of the inventioncomprises: dividing means for generating a plurality of divided data bydividing input data by a predetermined unit; means for generatingerror-correcting-code data for generating a plurality oferror-correcting-code data corresponding to the divided data, thedivided data being inputted to the means for generatingerror-correcting-code data; means for recording and reproducing divideddata for recording the divided data on first non-linear accessiblerecording media, respectively, the divided data being inputted to themeans for recording and reproducing divided data, while reproducing thedivided data recorded on the first non-linear accessible recordingmedia; means for recording and reproducing error-correcting-code datafor recording a plurality of the error-correcting-code data on a secondnon-linear accessible recording media, respectively, theerror-correcting-code data being generated by the means for generatingerror-correcting-code data and inputted to the means for recording andreproducing error-correcting-code data, while reproducing theerror-correcting-code data recorded on the second non-linear accessiblerecording media; error-correcting means for performing error-correctingprocessing on the divided data using the error-correcting-code data, theerror-correcting-code data being reproduced by the means for recordingand reproducing error-correcting-code data and inputted to theerror-correcting means, and the divided data being reproduced by themeans for recording and reproducing divided data and inputted to theerror-correcting means; and multiplying means for multiplying andoutputting the divided data, the divided data being outputted from theerror-correcting means and inputted to the multiplying means.

Still another data recording and reproducing apparatus of the inventioncomprises: means for recording and reproducing divided data forrecording a plurality of divided data obtained through dividing inputdata by a predetermined unit on a first non-linear accessible recordingmedium, while reproducing the divided data recorded on the firstnon-linear accessible recording medium; means for recording andreproducing error-correcting-code data for generating a plurality oferror-correcting-code data for the divided data to record theerror-correcting-code data on a second non-linear accessible recordingmedium, while reproducing the error-correcting-code data recorded on thesecond non-linear accessible recording medium; error-correcting meansfor performing error-correcting processing on the divided datareproduced from the means for recording and reproducing divided datausing the error-correcting-code data reproduced from the means forrecording and reproducing error-correcting-code data; means forcontrolling data-restoring processing for performing restoringprocessing on the divided data through: controlling the means forrecording and reproducing divided data and the means for recording andreproducing error-correcting-code data to reproduce the divided data andthe error-correcting-code data corresponding to the divided data, whichare recorded on the first non-linear accessible recording medium and thesecond non-linear accessible recording medium, respectively, except thedivided data to be restored; controlling the error-correcting means toperform error-correcting processing on the divided data based on thedivided data and the error-correcting-code data; and controlling themeans for recording and reproducing divided data to record the divideddata to be restored on which the error-correcting processing has beenperformed on the first non-linear accessible recording medium.

A further data recording and reproducing apparatus of the inventioncomprises: means for recording and reproducing divided data forrecording a plurality of divided data obtained through dividing inputdata by a predetermined unit on a plurality of first non-linearaccessible recording media, respectively, while reproducing the divideddata recorded on the first recording media; means for recording andreproducing error-correcting-code data for generating a plurality oferror-correcting-code data for the divided data to record theerror-correcting-code data on a second non-linear accessible recordingmedium, while reproducing the error-correcting-code data recorded on thesecond recording medium; and means for controlling re-allottingprocessing for controlling the means for recording and reproducingdivided data to exclude the first recording medium subject tore-allotting processing, in which to the correspondence between logicaladdress and physical address in the recording region of the firstrecording media is changed, from other first recording media on whichrecording and reproducing are performed by the means for recording andreproducing divided data, and to perform the re-allotting processing.

Another method of recording and reproducing data of the inventionincludes: a first step of generating a plurality of divided data bydividing input data by a predetermined unit; a second step of generatinga plurality of error-correcting-code data corresponding to the divideddata, the divided data being inputted; a third step of recording thedivided data on a first non-linear accessible recording medium, thedivided data being inputted, while recording the error-correcting-codedata on a second non-linear accessible recording medium; a fourth stepof reproducing the divided data from the first non-linear accessiblerecording medium, while reproducing the error-correcting-code data fromthe second non-linear accessible recording medium; a fifth step ofperforming error-correcting processing on the divided data using theerror-correcting-code data if any of the divided data can not bereproduced in the fourth step, the divided data and theerror-correcting-code data being reproduced in the fourth step andinputted; and a sixth step of multiplying and outputting the divideddata, the divided data being outputted in the fifth step and inputted.

Still another method of recording and reproducing data of the inventionincludes: a first step of recording a plurality of divided data obtainedthrough dividing input data by a predetermined unit on a firstnon-linear accessible recording medium, while generating a plurality oferror-correcting-code data for the divided data to record them on asecond non-linear accessible recording medium; a second step ofreproducing the divided data recorded on the first recording medium inthe first step, while reproducing the error-correcting-code datarecorded on the second non-linear accessible recording medium; a thirdstep of performing error-correcting processing on the divided datareproduced in the second step based on the error-correcting-code datareproduced in the second step; and a fourth step of performing restoringprocessing on the divided data which can not be recorded on the firstrecording medium in the first step and needs to be restored andre-recorded thereon through: reproducing the divided data and theerror-correcting-code data corresponding to the divided data, which arerecorded on the first recording medium and the second recording medium,respectively, except the divided data to be restored, from the firstrecording medium and the second recording medium; performingerror-correcting processing on at least the divided data to be restoredbased on the reproduced divided data and the error-correcting-code datawhich have been reproduced; and re-recording the divided data to berestored on which the error-correcting processing has been performed onthe first recording medium.

A further method of recording and reproducing data of the inventionincludes: a first step of recording a plurality of divided data obtainedthrough dividing input data by a predetermined unit on a firstnon-linear accessible recording medium, while generating a plurality oferror-correcting-code data for the divided data to recorderror-correcting-code data on a second non-linear accessible recordingmedium; a second step of reproducing the divided data recorded on thefirst non-linear accessible recording medium in the first step, whilereproducing the error-correcting-code data recorded on the secondnon-linear accessible recording medium; and a third step of excludingthe first recording medium subject to re-allotting processing, in whichthe correspondence between the logical address and physical address inthe recording region of the first recording medium is changed, fromother first recording media on which recording and reproducing areperformed by the means for recording and reproducing divided data in thefirst and second steps, and of performing re-allotting processing.

Another AV server of the invention comprises: a plurality ofinput/output processing means for converting data including visual andaudio data inputted from outside to data which can be recorded on anon-linear accessible recording medium, while outputting the dataoutputted from the recording medium after converting the data to datawhich can be outputted outside; means for recording and reproducingdivided data for recording a plurality of divided data obtained throughdividing the data outputted from each of the input/output processingmeans on a first non-linear accessible recording medium, whilereproducing the divided data recorded on the first non-linear accessiblerecording medium; means for recording and reproducingerror-correcting-code data for generating a plurality of theerror-correcting-code data for the divided data to record theerror-correcting-code data on a second non-linear accessible recordingmedium, while reproducing the error-correcting-code data recorded on thesecond non-linear accessible recording medium; error-correcting meansfor performing error-correcting processing on the divided datareproduced from the means for recording and reproducing divided datausing the error-correcting-code data reproduced from the means forrecording and reproducing error-correcting-code data; and means forcontrolling data restoring processing for performing restoringprocessing on the divided data through: controlling the means forrecording and reproducing divided data and the means for recording andreproducing error-correcting-code data to reproduce the divided data andthe error-correcting-code data corresponding to the divided data, whichare recorded on the first non-linear accessible recording medium and thesecond non-linear accessible recording medium, respectively, except thedivided data to be restored; controlling the error-correcting means toperform error-correcting processing on the divided data based on thedivided data and the error-correcting-code data which have beenreproduced; and controlling the means for recording and reproducingdivided data to record the divided data to be restored on which theerror-correcting processing has been performed on the first non-linearaccessible recording medium.

Still another AV server of the invention comprises: a plurality ofinput/output processing means for converting data including visual andaudio data inputted from outside to data which can be recorded on anon-linear accessible recording medium, while outputting the dataoutputted from the recording medium after converting the data to datawhich can be outputted outside; means for recording and reproducingdivided data for recording a plurality of divided data obtained throughdividing data outputted from each of the input/output processing meanson a first non-linear accessible recording medium, while reproducing thedivided data recorded on the first non-linear accessible recordingmedium; means for recording and reproducing error-correcting-code datafor generating the error-correcting-code data for the divided data torecord the error-correcting-code data on a second non-linear accessiblerecording medium, while reproducing the error-correcting-code datarecorded on the second non-linear accessible recording medium; and meansfor controlling re-allotting processing for controlling the means forrecording and reproducing divided data to exclude the first recordingmedium subject to re-allotting processing, in which the correspondencebetween logical address and physical address in the recording region ofthe first recording medium is exchanged from other first recording mediaon which recording and reproducing are performed by the means forrecording and reproducing divided data, and to perform the re-allottingprocessing.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a block diagram showing a configuration example of a videoserver which includes a data recording and reproducing apparatusaccording to an embodiment of the invention.

FIG. 2 is a block diagram showing the configuration of the datarecording and reproducing apparatus according to an embodiment of theinvention.

FIG. 3 is a flow chart showing the operation of the data recording andreproducing apparatus according to an embodiment of the invention in onetime slot in the regular mode.

FIG. 4 is a flow chart following FIG. 3.

FIG. 5 is a flow chart showing the operation of aportion-rebuild-processing in FIG. 4.

FIG. 6 is a flow chart showing the operation of the data recording andreproducing apparatus according to an embodiment of the invention in there-allotting processing mode.

FIG. 7 is a flow chart showing the operation of the data recording andreproducing apparatus according to an embodiment of the invention in onetime slot in the whole-rebuild-processing mode.

FIG. 8 is an explanatory figure for describing a format on a hard diskaccording to an embodiment of the invention.

FIGS. 9A and 9B are explanatory figures for describing thecorrespondence between a logical address and a physical sector number.

FIG. 10 is a characteristic figure showing an example of the result ofcomparing the reliability of the data recording and reproducingapparatus according to an embodiment of the invention to that of thedata recording and reproducing apparatus using the RAID-3.

FIG. 11 is a block diagram showing a configuration example of the datarecording and reproducing apparatus using the RAID-3.

FIG. 12 is a block diagram showing a configuration example of the datarecording and reproducing apparatus using the RAID-5.

BEST MODE FOR CARRYING OUT THE INVENTION

In the followings, the best modes for embodying the invention will bedescribed in detail with reference to the drawings.

FIG. 1 is a block diagram showing a configuration example of a videoserver which includes a data recording and reproducing apparatusaccording to an embodiment of the invention. This video server 10 isused as a multi-channal video server. The video server 10 comprises aplurality of data recording and reproducing apparatuses (referred asRAID in figure) 11 ₁ to 11 _(n) (n is an integer of 2 or more) accordingto the embodiment for recording and reproducing data including videodata, and an input/output processor section 12 for inputting data to berecorded on the data recording and reproducing apparatuses 11 ₁ to 11_(n) and outputting data reproduced from the data recording andreproducing apparatuses 11 ₁ to 11 _(n).

The input/output processor section 12 includes a plurality ofinput/output processors (referred as IOP in figure) 13 ₁ to 13 _(m) (mis an integer of 2 or more) for accessing to the data recording andreproducing apparatus 11 ₁ to 11 _(n) so as to record or reproduce dataon/from the data recording and reproducing apparatuses 11 ₁ to 11 _(n)respectively in a time-divided manner, with a unit of time slots, whichare a plurality of the time-division divided by a specific timeinterval, a managing device 14 for managing material information and thelike, and up data buses 15 and down data buses 16 for connecting theinput/output processor 13 ₁ to 13 _(m), the managing device 14 to thedata recording and reproducing apparatuses 11 ₁ to 11 _(n). The samenumber of the up data buses 15 and the down data buses 16 as the numberof the data recording and reproducing apparatuses 11 ₁ to 11 _(n) areprovided. Each up data bus 15 is connected to one data recording andreproducing apparatus 11 _(i) (i is any integer between 1 and n), theinput/output processor 13 ₁ to 13 _(m) and the managing device 14 and sois each down data bus 16. That is, an input/output processor 13 _(j) (jis any integer between 1 and m) and the managing device 14 are connectedto a plurality of the up data buses 15 and a plurality of the down databuses 16. Incidentally, in the embodiment, the down data bus 16 is fortransmitting data from the input/output processor 13 ₁ to 13 _(m) andthe managing device 14 to the data recording and reproducing apparatuses11 ₁ to 11 _(n). The up data bus 15 is for transmitting data the otherway around.

Each of the input/output processors 13 _(j) is made to convert inputsignals SI_(j) such as video signals to data in a predetermined formatif recording data, and transmit the data and a command to record thedata to the data recording and reproducing apparatus 11 ₁ to 11 _(n)through the down data bus 16. Each of the input/output processors 13_(i) is also made to transmit a command to reproduce data to the datarecording and reproducing apparatuses 11 ₁ to 11 _(n) through the downdata bus 16 if reproducing data, to convert the data reproduced from thedata recording and reproducing apparatuses 11 ₁ to 11 _(n) andtransmitted through the up data bus 15 to a predetermined signal, and tooutput it as an output signal SO_(j) outside.

The data recording and reproducing apparatus 11 _(i) comprises aplurality of HDDs for recording input data and redundancy-code data.When recording data, the data recording and reproducing apparatus 11_(i) is made to receive input data and a command from the input/outputprocessor 13 _(i) through the down data bus 16, to generate a pluralityof divided data by dividing the input data by a predetermined unit whilegenerating the redundancy-code data based on the input data, and torecord the divided data and the redundancy-code data on a plurality ofthe HDDs according to the command. When reproducing data, the datarecording and reproducing apparatus 11 _(i) is made to receive a commandfrom the input/output processors 13 _(j) through the down data bus 16,to reproduce the divided data and the redundancy-code data bycontrolling a plurality of the HDDs in accordance with the command, tocorrect errors of the divided data using the redundancy-code data, tomultiply the divided data which have been error-corrected, and to outputthem to the input/output processors 13 _(j) through the up data bus 15as the output data.

FIG. 2 is a block diagram showing the configuration of the datarecording and reproducing apparatus according to the embodiment. Thedata recording and reproducing apparatus 11 (represents 11 ₁ to 11 _(n))comprises: a plurality of HDDs 21 ₁ to 21 _(K) (K is an integer of 2 ormore) for recording input data; two HDDs 28 ₁ and 28 ₂ for recording theredundancy-code data as the error-correction-code data; a datadistributor 22 for generating a plurality of divided data by dividinginput data D_(I) at a specific length and distributing the divided datato the HDDs 21 ₁ to 21 _(K); a redundancy-code generator 26 forgenerating and outputting redundancy-code data P1 and P2 from thedivided data outputted from the data distributor 22; input memories 23 ₁to 23 _(K) for temporarily keeping the divided data outputted from thedata distributor 22; input memories 27 ₁ and 27 ₂ for temporarilykeeping the redundancy-code data P1 and P2 outputted from theredundancy-code generator 26; controllers 24 ₁ to 24 _(K), 29 ₁ and 29₂, which are connected to the HDDs 21 ₁ to 21 _(K), 28 and 28 ₂respectively, for controlling recording (also referred as writing in thefollowings) the data kept by the 23 ₁ to 23 _(K), 27 ₁ and 27 ₂on theHDDs 21 ₁ to 21 _(K), 28 ₁ and 28 ₂ and reproducing (also referred asreading out in the followings) the data from the HDDs 21 ₁ to 21 _(K),28 ₁ and 28 ₂; output memories 25 ₁ to 25 _(K), 30 ₁ and 30 ₂ fortemporarily keeping the data read out from the HDDs 21 ₁ to 21 _(K), 28₁ and 28 ₂ respectively; an error corrector 31 for restoring the divideddata by performing error-detection and error-correction using the datakept by the output memories 25 ₁ to 25 _(K), 30 ₁ and 30 ₂ and errorinformation which is described later; a data multiplier 32 formultiplying the output data of the error corrector 31 to output them asoutput data D_(O); and a CPU 33 for controlling the whole apparatus. Inaddition, the output data of the data multiplier 32 may be inputted tothe data distributor 22 under the control of the CPU 33. The CPU 33includes ROM (Read-Only-Memory) in which the program is stored and RAM(Random-Access-Memory) as a working area.

The HDDs 21 ₁ to 21 _(K), 28 ₁ and 28 ₂ are made to performdata-recording operation or data-reproducing operation on/from the harddisk by accessing any recording region of the hard disk (magnetic disk)which is a random accessible recording medium. If a data-reading-outerror occurs, the control section, which is not shown in figure, in theHDDs 21 ₁ to 21 _(K), 28 ₁ and 28 ₂ transmits the error informationindicating the error to the controllers 24 ₁ to 24 _(K), 29 ₁ and 29 ₂as status data. Furthermore, the error information is to be transmittedfrom the controllers 24 ₁ to 24 _(K), 29 ₁ and 29 ₂ to the CPU 33 aserror information ER₁ to ER_(K), ER_(P1) and ER_(P2).

Now, a format on a hard disk will be described with reference to FIG. 8.A plurality of tracks are provided on a hard disk in a concentriccircular pattern. Only one track is shown in FIG. 8. A plurality ofsectors, which are recording units of data, are provided by dividing thetracks in a radial pattern. There may be a case where these sectorsinclude sectors in which errors always occur at the time of writing orreading out data. Such sectors are called defective sectors. Defectivesectors are considered to be in a condition in which reading out orwriting data can not be correctly performed because of physical damageor the like. In case that there should be defective sectors, sparesectors may be provided on the hard disk so that data can be recorded onthe spare sectors instead of the defective sectors if necessary. Such aspare sector is called a substitute sector. In the HDD having substitutesectors, the control section in the HDD includes a correspondence tableshowing the correspondence between logical sector numbers (LBA) andphysical sector numbers so that the substitute sectors used instead ofthe defective sectors can be referred by the same sector number as thedefective sectors from the superior devices.

In the example shown in FIG. 8, N number of sectors (Sector-1 to SectorN) are physically allotted to one track while two spare sectors (Sparesector Spare-1 and Spare-2) are further provided. FIG. 9 shows thecorrespondence between LBA and the physical sector number shown in thecorrespondence table mentioned above. In a normal case without adefective sector, LBA and the physical sector number are coincide witheach other as shown in FIG. 9A. The control section in the HDD managesthe recording region on the hard disk based on the correspondenceaccording to the correspondence table shown in FIG. 9A in normal cases.In contrast, if there is a defect in the Sector Sector-5, the Sparesector Spare-1 is used instead of the Sector Sector-5. In such a case,as shown in FIG. 9B, the Spare sector Spare-1 is corresponded to the “5”in LBA, and the control section in the HDD is to manage the recordingregion on the hard disk based on the correspondence according to thecorrespondence table shown in FIG. 9B. Changing the correspondencebetween LBA and the physical sector number upon the defective sectorbeing generated as described is called a re-allotting processing(Reassign).

The CPU 33 is made to receive a command from the input/output processor13 _(j) through the down data bus 16, and to control the HDDs 21 ₁ to 21_(k), 28 ₁ and 28 ₂ by giving an order to the controllers 24 ₁ to 24_(K), 29 ₁ and 29 ₂ respectively, according to the command. If areading-out error has occurred, the CPU 33 is also made to transmit theerror information indicating the error to the error corrector 31. Theerror information includes information that identifies the HDD in whichthe reading-out error has occurred.

The error corrector 31 is made to restore the divided data by performingerror detection and error correction using the error information fromthe CPU 33 and the data kept by the output memories 25 ₁ to 25 _(K), 30₁ and 30 ₂ if necessary, and to output the divided data which have beenrestored to the data multiplier 32. The data multiplier 32 is made torearrange the divided data outputted from the error corrector 31 in theoriginal data line, and to output it as the output data D_(O).

The HDDs 21 ₁ to 21 _(K) correspond to means for recording andreproducing divided data of the invention, the HDDs 283 and 28 ₂ tomeans for recording and reproducing error-correcting-code data of theinvention, the data distributor 22 to dividing means of the invention,the redundancy-code generator 26 to means for generatingerror-correcting-code data of he invention, the error corrector 31 toerror-correcting means of the invention, and the data multiplier 32 tothe multiplying means of the invention.

In the embodiment, a code which can correct the errors of a plurality ofdivided data is used as the error-correction code. One of such codes isthe BCH code. In the embodiment, the Read-Solomon code, a kind of theBCH code, is especially used as the error-correction code. Now, theRead-Solomon code will be described.

First, in the Read-Solomon code, 1 byte, ie 8 bits, is treated as onenumber, and 256 numbers, 00h to FFh (h represents the hexadecimalnumber), are used. Regarding the four fundamental rules of arithmetic,an arithmetic rule, which is different from the one used for integers,is employed.

In the Read-Solomon code, a polynomial such as a code polynomial or agenerating polynomial is used. For example, in a case where 2 bytes ofparity bytes are used for 14 bytes of data bytes, 14 bytes of data bytesand 2 bytes of parity bytes totaling 16 bytes are processed alltogether. Therefore, 14 bytes of data bytes are respectively referred asW₁₅, W₁₄, . . . , W₂, and 2 bytes of parity data are respectivelyreferred as W₁, W₀. W_(i) (i is integer between 0 and 15) is any numberranging from 00h to FFh with byte format.

The code polynomial W (X) is defined by the formula (1) in thefollowing.

W(X)=W ₁₅ ×X ¹⁵ +W ₁₄ ×X ¹⁴ + . . . +W ₂ ×X ² +W ₁ ×X+W ₀  (1)

X is also any number ranging from 00h to FFh with byte format.

In W(X) of the formula (1), the value of W₁×X+W₀ can be obtained as theremainder of dividing W₁₅×X¹⁵+W₁₄×X¹⁴+ . . . +W₂×X² by the generatingpolynomial G (X) represented by the formula (2).

G(X)=(X−02h)×(X−01h)  (2)

Accordingly, the values of parity byte W₁ and W₀ are determined so thatthe formula (3) and the formula (4) become valid.

W(02h)=00h  (3)

W(01h)=00h  (4)

In coding of the Read-Solomon code, parity byte is calculated from databyte based on such a correlation.

Next, error correction in the Read-Solomon code will be described.First, if the data V₁₅, V₁₄, . . . , V₁, V₀ corresponding to the databytes Wi₁₅, W₁₄, W₂ and the parity bytes W₁, W₀ are read out from theHDD (15), HDD (14), . . . , HDD (1), HDD (0) respectively, thereading-out data V_(i) is represented by the formula (5) or (6)depending on the existence of errors in the reading-out data V_(i). onthe HDD (i). E_(i) represents the magnitude of the error.

HDD (i) without error: Vi=Wi  (5)

HDD (i) with error: Vi=Wi+Ei  (6)

Next, in contrast with the code polynomial W (X), V (X) is defined bythe formula (7).

V(X)=V ₁₅ ×X ¹⁵ +V ₁₄ ×X ¹⁴ + . . . +V ₂ ×X ² +V ₁ ×X+V ₀  (7)

Furthermore, values S₁ and S₀ called syndromes are defined by theformulas (8) and (9).

S ₁ =V(02h)  (8)

S ₀ =V(01h)  (9)

If there are no errors in the reading-out data of the HDDs, thesyndromes are represented by the formulas (10) and (11), since V (X)=W(X).

S ₁=00h  (10)

S ₀=00h  (11)

Next, if no error information is reported by the HDD (i) even there isan error in the reading-out data of the HDD (i), the syndromes arerepresented by the formulas (12 and (13), since V (X)=W (X)+E_(i)×X^(i)based on the formulas (6) and (7).

S ₁ =E _(i)×02h^(i)  (12)

S ₀ =E _(i)×01h^(i) =E _(i)  (13)

Accordingly, the volume of the error E_(i) is obtained by the formula(13) and the attached letter i that shows which HDD (i) includes thereading-out data with the error can be obtained by the magnitude of theerror E_(i) and the formula (12). This enables error correction of thereading-out, which is called one-error-correction.

Next, if there are errors in the reading-out data in two HDDs, HDD (i)and HDD (j), (j is an integer from 0 to 15) and error information isreported by the HDD (i) and the HDD (j), the syndromes are representedby the formulas (14) and (15), since V (X)=W (X)+E_(i)×X_(i)+E_(j)×X_(j)based on the formulas (6) and (7).

S ₁ =E _(i)×02h^(i) +E _(j)×02h^(j)  (14)

 S ₀ =E _(i)×01h^(i) +E _(j)×01h^(j) =E _(i) +E _(j)  (15)

In this case, the values of the attached letters i and j are alreadyknown since it is assumed that there are reports of error informationfrom the HDD (i) and the HDD (j). Accordingly, the values of 02h^(i) and02h^(j) in the formula (14) can be calculated and the values of E_(i)and E_(j) can be obtained by a simultaneous equation with two unknowns.This enables error correction of the reading-out data, which is calledtwo-error-loss-correction.

In decoding of the Read-Solomon code, the values of the syndromes areobtained as described, and the location and the volume of the error areobtained using the value of the syndromes.

The data bytes W₁₅, W₁₄, . . . , W₂ correspond to the divided data ofthe embodiment, and the parity bytes W₁ and W₀ correspond to theredundancy-code data P1 and P2 of the embodiment.

Next, the operation of the data recording and reproducing apparatus 11according to the embodiment will be described. The description in thefollowing includes the description of the method for recording andreproducing data according to the embodiment.

First, the data-writing operation of the data recording and reproducingapparatus 11 will be described. The input data D_(I) is inputted to thedata distributor 22 to generate a plurality of divided data. The divideddata is distributed to the input memories 23 ₁ to 23 _(K) andtemporarily recorded in the input memories 23 ₁ to 23 _(K) while beinginputted to the redundancy-code generator 26. At this time, data may bedistributed in order as follows: provided that, for example, the dataare arranged in data lines D1, D2, D3, D4, D5, . . . , with a unit ofbit or byte, the data D1 is distributed to the first HDD 21 ₁ the dataD2 is distributed to the second HDD 21 ₂, and so forth, and if the dataDK is distributed to the last HDD 21 _(K), data is distributed in orderto the HDDs beginning at the first HDD 21 ₁ again.

The redundancy-code generator 26 generates the redundancy-code data P1and P2 of the Read-Solomon code based on the divided data outputted fromthe data distributor 22, and outputs them. The input memories 27 ₁ and27 ₂ temporarily record the redundancy-code data P1 and P2. After that,the controllers 24 ₁ to 24 _(K), 29 ₁ and 29 ₂ of the respective HDDs 21₁ to 21 _(K), 28 ₁ and 28 ₂ read out the divided data and theredundancy-code data P1 and P2 from the input memories 23 ₁ to 23 _(K),27 ₁ and 27 ₂ and write them onto the HDDs 21 ₁ to 21 _(K), 28 ₁ and 28₂ respectively under the control of the CPU 33.

Next, the data-reading-out operation of the data recording andreproducing apparatus 11 will be described. The controllers 24 ₁ to 24_(K), 29 ₁ and 29 ₂ read out the divided data and the redundancy-codedata P1 and P2 from the respective HDDs 21 ₁ to 21 _(K), 28 ₁ and 28 ₂and write them onto the output memories 25 ₁ to 25 _(K), 30 ₁ and 30 ₂respectively under the control of the CPU 33. At this time, if anreading-out error occurs in the HDDs 21 ₁ to 21 _(K), 28 ₁ and 28 ₂,error information indicating that an error has occurred is sent to thecontrollers 24 ₁ to 24 _(K), 29 ₁ and 29 ₂ as status data from thecontrol section in the HDDs 21 ₁ to 21 _(K), 28 ₁ and 28 ₂. Then, theerror information is sent to the CPU 33 as error information ER₁ toEr_(K), Er_(P1) and ER_(P2) from the controllers 24 ₁ to 24 _(K), 29 ₁and 29 ₂.

Each of the data recorded on the output memories 25 ₁ to 25 _(K), 30 ₁and 30 ₂ is synchronized and outputted to the error corrector 31. Atthis time, if the reading-out error occurs, error information indicatingthat an error has occurred is sent to the error corrector 31 from theCPU 33. The error information includes information for identifying theHDD in which the reading-out error has occurred. The error corrector 31restores the divided data based on the error information and theredundancy-code data P1 and P2 if necessary, and outputs them to thedata multiplier 32. The data multiplier 32 rearranges the divided dataoutputted from the error corrector 31 in the original data line andoutputs it outside as the output data D_(O).

In the embodiment, the Read-Solomon code, which can correct errors of aplurality of divided data, is used as the error-correction code so thatrestoring the divided data is possible in the following cases.

(1) if there is an error in the reading-out data in one HDD

Restoring divided data is possible not only in the case where errorinformation that the reading-out error has occurred in the HDD isreported, but also in the case where no error information is reported.

(2) if there are errors in the reading-out data in two HDDs and errorinformation that reading-out errors occurred in those HDDs is reported

In the meantime, if an error (referred as writing error in thefollowings) in an writing operation occurs in any of the HDDs, it isnecessary to restore the data in which the writing error has occurred.This data-restoring processing performed on part of the recording regionof the recording medium (hard disk) is called a portion-rebuildprocessing (Portion Rebuild) in the embodiment. In addition, if there isa defective sector where errors always occur in the writing operation orthe reading-out operation, the re-allotting processing (Reassign) inwhich the correspondence between LBA and the physical sector number ischanged is necessary as described. Furthermore, if any of the HDDs inthe data recording and reproducing apparatus is replaced, it isnecessary to rebuild the original data on the new HDD. Thisdata-restoring processing performed on the whole recording region of therecording medium (hard disk) is called a whole-rebuild processing (WholeRebuild) in the embodiment.

In the followings, an example of the total operation of the datarecording and reproducing apparatus 11 including the Portion Rebuild,the Reassign and the Whole Rebuild mentioned above will be described. Inthe following example, there are three operation modes of the datarecording and reproducing apparatus 11: the regular mode, the Reassignmode, and the Whole-Rebuild. The transition from the regular mode to theReassign mode occurs if predetermined conditions are fulfilled in theregular mode or if the data recording and reproducing apparatus 11receives a command from the superior device, that is, the input/outputprocessor section 12 in FIG. 1. If the processing of the Reassign iscompleted, the transition from the Reassign mode to the regular modeoccurs. The transition from the regular mode to the Whole-Rebuild modeoccurs if the data recording and reproducing apparatus 11 receives acommand from the superior device, that is, the input/output processorsection 12 in FIG. 1, or if the data recording and reproducing apparatus11 itself detects that any of the HDDs has been replaced. If theprocessing of the Whole-Rebuild mode is completed, the transition fromthe Whole-Rebuild mode to the regular mode occurs.

FIG. 3 and FIG. 4 are flow charts showing the operation of the datarecording and reproducing apparatus 11 in one time slot of the regularmode. In this operation, first, the CPU 33 determines whether the CPU 33itself has received a command to perform writing or not (step S101), andif it has received the command to perform writing (step S101; Y), theCPU 33 performs the above-mentioned writing operation (step S102). TheCPU 33 can determine whether it has received the command to performwriting or not by, for example, determining whether the commandtransferred from the input/output processors 13 ₁ to 13 ₆ through thebus 16 is the one to perform writing or not upon receiving the command.After the writing operation is completed, the CPU33 determines whetherthe data-writing has been successful or not (step S103) based on theinformation from the respective HDDs 21 ₁ to 21 _(K), 28 ₁ and 28 ₂. Ifthe data-writing has been successful (step S103; Y), the operation inone time slot is ended. If the data-writing has been unsuccessful (stepS103; N), the CPU 33 stores the HDD and the address on which writing hasbeen unsuccessful (step S104) and ends the operation in one time slot.

If the CPU 33 has not received a command to perform writing (step S101;N), the CPU 33 determines whether the CPU 33 itself has received acommand to perform reading-out (step S105). If the CPU 33 has received acommand to perform and perform reading-out (step 105; Y), the CPU 33performs the above-mentioned reading-out operation (step S106). The CPU33 can determine whether it has received the command to performreading-out or not by determining whether the command transferred fromthe input/output processors 13 ₁ to 13 ₆ through the bus 16 is thecommand to perform reading-out or not. After the reading-out operationis completed, the CPU 33 determines whether the data-reading-out hasbeen successful or not (step S107) based on existence of the errorinformation ER₁ to ER_(K), ER_(P1) and ER_(P2) from the respective HDDs21 ₁ to 21 _(K), 28 ₁ and 28 ₂. If the data-reading-out has beensuccessful (step S107; Y), the operation in one time slot is ended. Ifthe data-reading-out has been unsuccessful (step S107; N), the CPU 33stores the HDD and the address on which reading-out has beenunsuccessful, and the number of the failures in reading-out in the HDDand the address (step S108). Next, the CPU 33 determines whether thenumber of the failures stored in the step S108 is equal to or more thanthe predetermined value N1 (N1 is any integer of 1 or more) or not (stepS109). If the number of the failures in reading-out is less than thepredetermined value N1 (step S109; N), the operation in one time slot iscompleted. If the number of the failures in reading-out is equal to ormore than the predetermined value N1 (step S109; Y), the CPU 33 changesthe operation mode to the Reassign mode which is to be described later(step S115).

If neither the command to perform writing nor the command to performreading-out has been received by the CPU 33(step S105; N), the CPU 33determines whether there are a HDD and an address on which the PortionRebuild is to be performed or not (step S110). There are three kinds ofHDDs and addresses on which the Portion Rebuild is to be performed. Thefirst ones are the HDD and the address stored in the step S104 in whichwriting has been unsuccessful. The second ones are the HDD and theaddress on which the Reassign has been performed. The third ones are theHDD and the address stored during the suspension of the writingoperation in the process of the Reassign, and will be described indetail later. The HDD and the address on which the Portion Rebuild is tobe performed are stored by the CPU 33. However, the HDD and the addresson which the Portion Rebuild is to be performed may be stored by thesuperior device of the data recording and reproducing apparatus 11 thatis, the input/output processor section 12 shown in FIG. 1. Incidentally,if neither command to perform writing (step S101; N) nor command toperform reading-out (step S105; N) is received, no command to operate isreceived from the superior processor, ie the input/output processorsection 12. In other words, the superior processor, ie the input/outputprocessor section 12 operates in the allotted time slot if the commandto perform writing or the command to perform reading-out is receivedfrom the superior device. If no such command is received, the operationin the allotted time slot has completed.

If there is no HDD and address on which the Portion Rebuild is to beperformed (step S110; N), the CPU 33 ends the processing. If there arethe HDD and the address on which the Portion Rebuild is to be performed(step S110; Y), the CPU 33 performs the Portion Rebuild (step S111). ThePortion Rebuild will be described in detail later.

The CPU 33 determines whether the Portion Rebuild has been successful ornot (step S112) after completing the Portion Rebuild. If the PortionRebuild has been successful (step S112; Y), the CPU 33 ends theprocessing operation. If the Portion Rebuild has been unsuccessful (stepS112; N), the CPU 33 stores the HDD and the address on which the PortionRebuild has been unsuccessful, and the number of the failures in thePortion Rebuild in the HDD and the address (step S113). Next, the CPU 33determines whether the number of the failures stored in the step 113 isequal to or more than the predetermined value N2 (N2 is any integer of 1or more) or not (step S114). If the number of the failures in thePortion Rebuild is less than the predetermined value N2 (step S114; N),the operation in one time slot is ended. If the number of the failuresin the Portion Rebuild is equal to or more than the predetermined valueN2 (step S114; Y), the CPU 33 changes the operation mode to the Reassignmode (step S115).

As described, in the embodiment, the Portion Rebuild is performed in atime slot if no command to perform writing or reading-out is receivedfrom the superior device. In other words, in the spare time foroperation, without interrupting the writing operation of the datatransferred from the superior device, or the reading-out operation ofthe recorded data which is to be outputted to the superior device.

Next, the Portion Rebuild (step S111) will be described in detail withreference to the flow chart shown in FIG. 5. The Portion Rebuild isperformed sector by sector. In the Portion Rebuild, first, the CPU 33makes the controllers 24 ₁ to 24 _(K), 29 ₁ and 29 ₂ perform thereading-out operation by appointing the address (sector) on which thePortion Rebuild is performed. In response, the controllers 24 ₁ to 24_(K), 29 ₁ and 29 ₂ read out the data in the appointed address from theHDDs 21 ₁ to 21 _(K), 28 ₁ and 28 ₂ respectively (step S201). Theread-out data is inputted to the error corrector 31 through the outputmemories 25 ₁ to 25 _(K), 30 ₁ and 30 ₂. At this time, the CPU 33 givesa command for the error corrector 31 not to use the data read out fromthe HDD on which the Portion Rebuild is to be performed. The errorcorrector 31 restores portion of data (step S202) using the dataoutputted from the output memories 25 ₁ to 25 _(K), 30 ₁ and 30 ₂ exceptthe data read out from the HDD on which the Portion Rebuild is to beperformed, and outputs the portion of data which has been restored tothe data multiplier 32. The data multiplier 32 rearranges the divideddata outputted from the error corrector 31 in the original data line andoutputs it as the output data D_(O).

Next, under the control of the CPU 33, the output data D_(O) from thedata multiplier 32 is inputted to the data distributor 22. The portionof data which has been restored is written on the HDD on which thePortion Rebuild is to be performed (step S203) by performing the samewriting operation as that of the input data D_(I), and then the PortionRebuild is ended. In addition, in the writing operation, data-writingmay be performed only on the HDD on which the Portion Rebuild is to beperformed. To make the writing operation easier, however, data-writingmay be performed on all of the HDDs 21 ₁ to 21 _(K), 28 ₁ and 28 ₂.

In the embodiment, Read-Solomon code, which can perform error-correctionon a plurality of the divided data, is used as the error-correction codeso that the ability to detect and correct the error of the data equal tothe data recording and reproducing apparatus using the RAID-3 can bemaintained even during the Portion Rebuild. In other words, data can becorrectly restored even if a reading-out error occurs during the PortionRebuild in one of other HDDs than the HDD on which the Portion Rebuildis being performed.

In the above description of the Portion Rebuild, the output data D_(O)is transmitted from the data multiplier 32 to the data distributor 22,and then the writing operation is performed. The writing operation,however, may be performed after transmitting the divided data outputtedfrom the error corrector 31 to the input memories 23 ₁ to 23 _(K) andthe redundancy-code generator 26.

Furthermore, in the above description, the CPU 33 detects and recordsthe HDD and the address on which the Portion Rebuild is to be performed.However, the CPU 33 may be substituted by the superior device to thedata recording and reproducing apparatus 11. Specifically, the superiordevice, that is, the input/output processor section 12 shown in FIG. 1,stores the HDD and the address on which the Portion Rebuild is to beperformed, and gives a command for the data recording and reproducingapparatus 11 to perform the Portion Rebuild by appointing the HDD andthe address on which the Portion Rebuild is to be performed. The datarecording and reproducing apparatus 11 performs the Portion Rebuild uponreceiving the command. Also in such a case, the Portion Rebuild is madeto be performed in the time slot in which no command to perform writingor reading-out is received.

Next, the operation during the Reassign will be described with referenceto the flow chart shown in FIG. 6. The transition from the regular modeto the Reassign mode occurs if predetermined conditions are fulfilled inthe regular mode shown in FIG. 3 and FIG. 4 (step S115) or if a commandis received from the superior device to the data recording andreproducing apparatus 11 ₁ which is the input/output processor section12 shown in FIG. 1.

In the operation of the Reassign, first, the CPU 33 suspends the writingoperation and the reading-out operation on/from the HDD on which theReassign is to be performed (step S301). Next, the CPU 33 makes theReassign be started on the HDD (step S302) on which the Reassign is tobe performed, appointing the sector on which the Reassign is to beperformed. The sector on which the Reassign is to be performed refers toa sector in which the number of the failures in reading-out has becomeequal to or more than Ni and a sector in which the number of thefailures in the Portion Rebuild has become equal to or more than N2. TheReassign is, as described, to change the correspondence between LBA andthe physical sector number. If the CPU 33 receives a command to performwriting, during the Reassign, it makes the writing operation beperformed on the HDDs except the HDD on which the Reassign is to beperformed while storing the HDD on which the Reassign is to be performedand LBA onto which writing is to be performed according to the command.If the CPU 33 receives a command to perform reading-out, during theReassign, it makes the reading-out operation be performed on the HDDsexcept the HDD on which the Reassign is to be performed, and gives acommand for the error corrector 31 to perform the error correctionvoiding the data from the HDD on which the Reassign is to be performed.

Next, the CPU 33 determines whether the Reassign is completed or not(step S303). If it is not completed (step S303; N), the determiningprocess is repeated. If the Reassign is completed (step S303; Y), theCPU 33 cancels the suspension of the writing operation and thereading-out operation on/from the HDD on which the Reassign is to beperformed (step S304), and changes the operation mode to the regularmode (step S305).

As described, in the embodiment, the writing operation and thereading-out operation are carried out without being interrupted evenduring the Reassign. In addition, in the embodiment, the Read-Solomoncode, which can correct errors of a plurality of divided data, is usedas the error-correction code so that the ability to detect and correctthe error of the data equal to the data recording and reproducingapparatus using the RAID-3 can be maintained even during the Reassign.In other words, data can be correctly restored even if a reading-outerror occurs in the reading-out operation during the Reassign in one ofother HDDs than the HDD on which the Reassign is being performed.

Next, the Whole Rebuild will be described. The Whole Rebuild is carriedout if any of the HDD is replaced. The transition from the regular modeto the Whole Rebuild mode occurs if a command is received from thesuperior device to the data recording and reproducing apparatus 11 thatis, the input/output processor section 12 shown in FIG. 1, or if thedata recording and reproducing apparatus 11 itself detects the fact thatany of the HDDs has been replaced. The command from the input/outputprocessor section 12 includes information for identifying the HDD onwhich the Reassign is to be performed. The data recording andreproducing apparatus 11 itself detects that any of the HDD has beenreplaced in the following manner: first, the detecting operation isperformed by the CPU 33 if the data recording and reproducing apparatus11 is started or if a HDD is taken in and out; the controllers 24 ₁ to24 _(K), 29 ₁ and 29 ₂ detect that a HDD has been taken in and out, andtransmit the information to the CPU 33; it is determined whether the HDDis replaced or not using the serial numbers of the HDD detected by thecontrollers 24 ₁ to 24 _(K), 29 ₁ and 29 ₂, or the characteristicinformation of the HDD which has been recorded in advance on apredetermined region of the HDD.

Next, the operation in one time slot during the Reassign mode will bedescribed with reference to the flow chart shown in FIG. 7. In theoperation, first, the CPU 33 determines whether the command to performwriting has been received or not (step S401). If the command to performwriting has been received (step S401; Y), the CPU 33 performs thewriting operation (step S402). The writing operation at this time is thesame as that of the regular mode. After the writing operation iscompleted, the CPU 33 determines whether the data-writing has beensuccessful or not (step S403) based on the information from the HDDs 21₁ to 21 _(K), 28 ₁ and 28 ₂. If the data-writing has been successful(step S403; Y), the operation in one time slot is ended. If thedata-writing has been unsuccessful (step S403; N), the CPU 33 stores theHDD and the address in which writing has been unsuccessful (step S404),and ends the operation in one time slot.

If the CPU 33 has not received a command to perform writing (step S401;N), the CPU 33 determines whether the CPU 33 has received the command toperform reading-out or not (step S405). If the CPU 33 has received acommand to perform writing (step S401; Y), the CPU 33 performs thereading-out operation (step S406). In the reading-out operation at thistime, however, the CPU 33 gives a command for the error corrector 31 notto use the data read out from the HDD on which the Whole Rebuild is tobe performed. The error corrector 31 restores portion of data using thedata outputted from the output memories 25 ₁ to 25 _(K), 30 ₁ and 30 ₂except the data read out from the HDD on which the Whole Rebuild is tobe performed, and outputs the portion of data which has been restored tothe data multiplier 32. After the reading-out operation is completed,the CPU 33 determines whether the data-reading-out has been successfulor not (step S407) based on the existence of the error information ER₁to ER_(K), ER_(P1) and ER_(P2). If the data-reading-out has beensuccessful (step 407; Y), the operation in one time slot is ended. Ifthe data-writing has been unsuccessful (step S407; N), the CPU 33 storesthe HDD and the address on which reading-out has been unsuccessful (stepS408), and ends the operation in one time slot.

Neither command to perform writing nor command to perform reading-outhas been received by the CPU 33 (step S405; N), the CPU 33 performs theWhole Rebuild (step S409). The Whole Rebuild is to perform the sameprocessing as the Portion Rebuild on the whole recording region of thehard disk. Next, the CPU 33 determines whether the Whole Rebuild hasbeen totally completed or not (step S410). If the Whole Rebuild has notbeen completed (step S410; N), the operation in one time slot is ended.If the Whole Rebuild has been completed (step S410; Y), the CPU 33changes the operation mode to the regular mode (step S411).

In the embodiment as described, the Whole Rebuild is carried out in thetime slot if no command to perform writing or reading-out is given,without interrupting the writing operation or the reading-out operation.

In addition, in the embodiment, the Read-Solomon code, which can performerror-correction on a plurality of the divided data, is used as theerror-correction code so that the ability to detect and correct theerror of the data equal to the data recording and reproducing apparatususing the RAID-3 can be maintained even during the Whole Rebuild mode.In other words, data can be correctly restored even if a reading-outerror occurs during the Whole Rebuild in one of other HDDs than the HDDon which the Whole Rebuild is to be performed. Data can also becorrectly restored even if a reading-out error occurs in the reading-outoperation during the Whole Rebuild mode in one of other HDDs than theHDD on which the Whole Rebuild is to be performed.

In addition, in the Whole Rebuild, data-writing may be performed only onthe HDD on which the Portion Rebuild is to be performed. To make thewriting operation easier, however, data-writing may be performed on allof the HDDs 21 ₁ to 21 _(K), 28 ₁ and 28 ₂, like the Portion Rebuild.

In the above description of the Whole Rebuild, the output data D_(O) istransmitted from the data multiplier 32 to the data distributor 22, andthen the writing operation is performed. The writing operation, however,may be performed after transmitting the divided data outputted from theerror corrector 31 to the input memories 23 ₁ to 23 _(K) and theredundancy-code generator 26.

As described, the data recording and reproducing apparatus 11 accordingto the embodiment is made to generate a plurality of divided data bydividing input data by a predetermined unit and theerror-correction-code data (redundancy-code data P1, P2) for the inputdata using the correction-code data (Read-Solomon code) which cancorrect errors of a plurality of divided data based on the input data,and to record the divided data and the error-correction-code data on theHDDs 21 ₁ to 21 _(K), 28 ₁ and 28 ₂ respectively at the time ofrecording data. It is also made to reproduce the divided data and theerror-correction-code data from the HDDs 21 ₁ to 21 _(K), 28 ₁ and 28 ₂,to perform the error-correction processing on the divided data which hasbeen reproduced using the error-correction-code data which has beenreproduced to multiply the divided data on which the error-correctionprocessing has been performed, and output them. Accordingly, the datarecording and reproducing apparatus 11 according to the embodiment has abetter ability in detecting and correcting errors of data compared tothe data recording and reproducing apparatus using the RAID-3 or theRAID-5, and the reliability of the system is greatly improved. Besides,the data recording and reproducing apparatus 11, like the data recordingand reproducing apparatus using the RAID-3, can perform writing inputdata by one access, and can immediately perform error correction afterreading out data. As a result, it is suitable for processing whichrequires a real-time operation and for a device such as a multi-channelvideo server which requires a real-time operation.

Specifically, in the data recording and reproducing apparatus 11according to the embodiment, the redundancy-code data P1 and P2 whichcan correct errors in two divided data are made to be generated so thatthe ability to detect and correct errors of data equal to the datarecording and reproducing apparatus using the RAID-3 can be maintainedeven if one of the HDDs breaks down. In addition, if there is noread-out error and one of the HDDs reads out invalid data, it ispossible to detect the invalid data and to restore the data.Furthermore, if two of the HDDs read out invalid data, data can berestored if the read-out error in each of the HDDs is detected.

Moreover, with the data recording and reproducing apparatus 11 accordingto the embodiment, the ability to detect and correct errors of dataequal to the data recording and reproducing apparatus using the RAID-3can be maintained even during the Portion Rebuild so that thereliability of the system can be improved and the maintenance of theapparatus becomes easier.

In addition, with the data recording and reproducing apparatus 11according to the embodiment, the Portion Rebuild can be performed whilea device which requires the real-time operation such as a multi-channelvideo server is being operated since the Portion Rebuild is carried outin the time slot if no command to perform writing or reading-out isgiven.

Further, with the data recording and reproducing apparatus 11 accordingto the embodiment, the ability to detect and correct errors of dataequal to the data recording and reproducing apparatus using the RAID-3can be maintained even during the Whole Rebuild so that the reliabilityof the system can be improved and the maintenance of the apparatusbecomes easier.

Further, with the data recording and reproducing apparatus 11 accordingto the embodiment, the Whole Rebuild can be performed while a devicewhich requires the real-time operation such as a multi-channel videoserver is being operated since the Whole Rebuild is carried out in thetime slot if no command to perform writing or reading-out is given.

Further, with the data recording and reproducing apparatus 11 accordingto the embodiment, the Reassign can be performed while a device whichrequires the real-time operation such as a multi-channel video server isbeing operated since the writing operation or the reading-out operationis made to be carried out without being interrupted even during theReassign.

Further, with the data recording and reproducing apparatus 11 accordingto the embodiment, the ability to detect and correct errors of dataequal to the data recording and reproducing apparatus using the RAID-3can be maintained even during the Reassign so that the reliability ofthe system can be improved and the maintenance of the apparatus becomeseasier.

At last, an example of the result of the comparison of the reliabilityof the data recording and reproducing apparatus according to theembodiment and that of the data recording and reproducing apparatususing the RAID-3 will be described with reference to FIG. 10. In thisexample, the data recording and reproducing apparatus according to theembodiment has a configuration comprising fourteen HDDs for recordingdivided data and two HDDs for recording the redundancy-code data usingthe Read-Solomon code. In contrast, the data recording and reproducingapparatus using the RAID-3 has a configuration comprising two pairs ofthe combination of seven HDDs for recording divided data and one HDD forrecording parity data. In this example, both the data recording andreproducing apparatus according to the embodiment and the data recordingand reproducing apparatus using the RAID-3 use sixteen HDDs, which meansthat they have the same capacity of hard wares, and their redundancy areboth one eighth.

In FIG. 10, the horizontal axis represents the error-occurringprobability P_(U) in one HDD independently, and the vertical axisrepresents the error-occurring probability P_(S) in the whole datarecording and reproducing apparatus. The line referred to with thereference character R6 shows the correlation between the error-occurringprobability P_(U) in one HDD independently, and the error-occurringprobability P_(S) in the whole apparatus, with regard to the datarecording and reproducing apparatus according to the embodiment. Theline referred to with the reference character R3 shows the correlationbetween the error-occurring probability P_(U) in one HDD independently,and the error-occurring probability P_(S) in the whole apparatus, withregard to the data recording and reproducing apparatus using the RAID-3.

The line referred to with the reference character R6 is represented bythe formula shown below.

 P _(S)=₁₆ C ₃ P _(U) ³(1−P _(U))¹³

Likewise, the line referred to with the reference character R3 isrepresented by the formula shown below.

P _(S)=2×₈ C ₂ P _(U) ²(1−P _(U))⁶

In FIG. 10, the reference character D shows the difference in theerror-occurring probability P_(S) in the whole apparatus between thedata recording and reproducing apparatus according to the embodiment andthe data recording and reproducing apparatus using the RAID-3, with theerror correcting probability P_(U) in one HDD independently set to afixed value. As evident from the difference D in the error-occurringprobability P_(S) between the two apparatuses, the data recording andreproducing apparatus according to the embodiment has the smallererror-occurring probability P_(S) than the data recording andreproducing apparatus using the RAID-3, and is more reliable.

In FIG. 10, the line referred to with the reference character C showsthe relation of P_(U)=P_(S) if the RAID is not used. In the region belowthe line C, the error-occurring probability P_(S) in the whole apparatusbecomes smaller than the error-occurring probability P_(U) in one HDDindependently, and the apparatus becomes more reliable. The intersectionpoints at which the lines R6 and R3 cross the line C are the divergingpoints at which the apparatus starts to become more reliable compared toa case where the RAID is not used. The points at which the lines R6 andR3 cross the line C, that is, the diverging points, are given referencecharacters A and B respectively. The data recording and reproducingapparatus according to the embodiment is more reliable compared to acase where the RAID is not used if it has the smaller probability P_(U)than the probability P_(U) at the diverging point A. The data recordingand reproducing apparatus using the RAID-3 is more reliable compared toa case where the RAID is not used if it has the smaller probabilityP_(U) than the probability P_(U) at the diverging point B.

Since the probability P_(U) at the diverging point A is larger than theprobability P_(U) at the diverging point B, it is clear that the datarecording and reproducing apparatus according to the embodiment is moretolerant to random errors and more reliable compared to the datarecording and reproducing apparatus using the RAID-3.

The results of the comparison as described above shows that the datarecording and reproducing apparatus according to the embodiment is morereliable compared to the data recording and reproducing apparatus usingthe RAID-3, with the equal capacity and redundancy.

It is to be understood that the invention is not limited to theabove-mentioned embodiment. In the embodiment, for example, a hard diskis used as the recording medium for recording divided data anderror-correction-code data. However, the recording medium is not limitedto a hard disk; a magneto-optical disk or a semiconductor memory may beused instead.

In addition, the error-correction-code data is not limited to the datausing the Read-Solomon code; the data using other error-correction codemay be employed if it can correct errors of a plurality of divided data.

While an example of recording two bytes of the error-correction-codedata (redundancy-code data) on two HDDs has been described in theembodiment, three or more bytes of the error-correction-code data may berecorded on three or more HDDs. If the more number of bytes of theerror-correction-code data increases, the redundancy becomes larger butthe number of the divided data in which errors can be correctedincreases. Therefore, the apparatus becomes more reliable.

Besides, the embodiment has been described on the assumption that theinvention is applied to, for example, a multi-channel video server usedfor recording and reproducing video/audio data in a broadcasting stationor the like. However, it is to be understood that the invention is notlimited in its application to a multi-channel video server but can beapplied to apparatuses used for recording and reproducing other kinds ofdata.

As described, according to the invention, the apparatus and the methodfor recording and reproducing data and AV server, which are excellent inability to detect and correct errors of data and are suitable forprocessing which requires a real-time operation, can be implemented.

In addition, according to the invention, the apparatus and the methodfor recording and reproducing data and AV server, which can detect andcorrect errors of data even during the error-restoring processing andare suitable for processing which requires a real-time operation, can beimplemented.

Moreover, according to the invention, the apparatus and the method forrecording and reproducing data and AV server, which can perform thedata-restoring processing without interrupting the operation ofrecording and reproducing data, can be implemented.

Besides, according to the invention, the apparatus and the method forrecording and reproducing data and AV server, which can detect andcorrect errors of data even during the Reassign, can perform theReassign without interrupting the operation of recording and reproducingdata, and are suitable for processing which requires a real-timeoperation, can be implemented.

Furthermore, according to the invention, the apparatus and the methodfor recording and reproducing data, which can detect and correct errorsof data even in the data-restoring-processing after the Reassign, can beimplemented.

What is claimed is:
 1. A data recording and reproducing apparatuscomprising: dividing means for generating a plurality of divided data bydividing input data by a predetermined unit; means for generatingerror-correcting-code data for generating a plurality oferror-correcting-code data corresponding to the divided data, thedivided data being inputted to the means for generatingerror-correcting-code data; means for recording and reproducing divideddata for recording the divided data on the respective first non-linearaccessible recording media, the divided data being inputted to the meansfor recording and reproducing divided data, while reproducing thedivided data recorded on the first non-linear accessible recordingmedia; means for recording and reproducing error-correcting-code datafor recording the error-correcting-code data on respective secondnon-linear accessible recording media, the error-correcting-code databeing generated by the means for generating error-correcting-code dataand inputted to the means for recording and reproducingerror-correcting-code data, while reproducing the error-correcting-codedata recorded on the second non-linear accessible recording media;error-correcting means for performing error-correcting processing on thedivided data using the error-correcting-code data, theerror-correcting-code data being reproduced by the means for recordingand reproducing error-correcting-code data and inputted to theerror-correcting means, and the divided data being reproduced by themeans for recording and reproducing divided data and inputted to theerror-correcting means; and multiplying means for multiplying andoutputting the divided data, the divided data being outputted from theerror-correcting means and inputted to the multiplying means.
 2. A datarecording and reproducing apparatus according to claim 1, wherein: themeans for recording and reproducing divided data records the divideddata on the respective first non-linear accessible recording media; andthe means for recording and reproducing error-correcting data recordsthe error-correcting-code data on the respective second non-linearaccessible recording media.
 3. A data recording and reproducingapparatus according to claim 1 wherein the error-correcting-code data isRead-Solomon code data.
 4. A data recording and reproducing apparatusaccording to claim 1 wherein the first and the second non-linearaccessible recording media are hard disks.
 5. A method of recording andreproducing data including: a first step of generating a plurality ofdivided data by dividing input data by a predetermined unit; a secondstep of generating a plurality of error-correcting-code datacorresponding to the divided data, the divided data being inputted; athird step of recording the divided data on a first non-linearaccessible recording medium, the divided data being inputted, whilerecording the error-correcting-code data on a second non-linearaccessible recording medium; a fourth step of reproducing the divideddata from the first non-linear accessible recording medium, whilereproducing tie error-correcting-code data from the second non-linearaccessible recording medium; a fifth step of performing error-correctingprocessing on the divided data using the error-correcting-code data ifany of the divided data cannot be reproduced in the fourth step, thedivided data and the error-correcting-code data being reproduced in thefourth step and inputted; and a sixth step of multiplying and outputtingthe divided data, the divided data being outputted in the fifth step andinputted.
 6. A method of recording and reproducing data according toclaim 5, wherein in the third step the divided data is recorded on therespective first non-linear accessible recording media, while theerror-correcting-code data is recorded on the respective secondnon-linear accessible recording media.
 7. A method of recording andreproducing data according to claim 5, wherein the error-correcting-codedata is Read-Solomon code data.
 8. A method of recording and reproducingdata according to claim 5, wherein the first and the second non-linearaccessible recording media are hard disks.
 9. A data recording andreproducing apparatus comprising: means for recording and reproducingdivided data for recording a plurality of divided data obtained througha dividing means for dividing the input data by a predetermined unit andrecording the divided data on a first non-linear accessible recordingmedium, while reproducing the divided data recorded on the firstnon-linear accessible recording medium; means for generatingerror-correcting-code data for outputting the error-correcting-code datafor the divided data, the divided data being inputted from the dividingmeans; means for recording and reproducing the error-correcting-codedata on a second non-linear accessible recording medium, whilereproducing the error-correcting-code data recorded on the secondnon-linear accessible recording medium; error-correcting means forperforming error-correcting processing on the divided data reproducedfrom the means for recording and reproducing divided data using theerror-correcting-code data reproduced from the means for recording andreproducing error-correcting-code data; means for controllingdata-restoring processing for performing restoring processing on thedivided data through: controlling the means for recording andreproducing divided data and the means for recording and reproducingerror-correcting-code data to reproduce the divided data and theerror-correcting-code data corresponding to the divided data, which arerecorded on the first non-linear accessible recording medium and thesecond non-linear accessible recording medium respectively, except thedivided data to be restored; controlling the error-correcting means toperform error-correcting processing on the divided data based on thedivided data and the error-correcting-code data; and controlling themeans for recording and reproducing divided data to record the divideddata to be restored on which the error-correcting processing has beenperformed on the first non-linear accessible recording medium; andmultiplying means for multiplying and outputting the divided data, thedivided data being outputted from the error-correcting means.
 10. A datarecording and reproducing apparatus according to claim 9, wherein: themeans for recording and reproducing divided data records the divideddata on the respective first non-linear accessible recording media; andthe means for recording and reproducing error-correcting-code datarecords the error-correcting-code data on the respective secondnon-linear accessible recording media.
 11. A data recording andreproducing apparatus according to claim 9, wherein the means forcontrolling data-restoring processing performs restoring processing onthe divided data in part of the recording region of the first non-linearaccessible recording medium.
 12. A data recording and reproducingapparatus according to claim 9, wherein the means for controllingdata-restoring processing performs restoring processing of the divideddata in the whole recording region of the first non-linear accessiblerecording medium.
 13. A data recording and reproducing apparatusaccording to claim 12, wherein the means for controlling data-restoringprocessing performs the restoring processing on the divided data if anyof the divided data is not recorded on the first non-linear accessiblerecording medium or any of the divided data is not reproduced from thefirst recording medium, while the first recording medium to be restoredis excluded from the divided data to be reproduced until the restoringprocessing of the first recording medium is completed.
 14. A datarecording and reproducing apparatus according to claim 9, wherein theerror-correcting-code data is Read-Solomon code data.
 15. A datarecording and reproducing apparatus according to claim 9, wherein thefirst and the second non-linear accessible recording media are harddisk.
 16. A data recording and reproducing apparatus according to claim9, wherein the means for controlling data-restoring processing performsrestoring processing on the divided data if any of the divided data isnot recorded on the first non-linear accessible recording medium or anyof the divided data is not reproduced from the first recording medium.17. A method of recording and reproducing data including: a first stepof recording a plurality of divided data obtained through dividing inputdata by a predetermined unit on a first non-linear accessible recordingmedium, while generating a plurality of error-correcting-code data forthe divided data to record them on a second non-linear accessiblerecording medium; a second step of reproducing the divided data recordedon the first recording medium in the first step, while reproducing theerror-correcting-code data recorded on the second non-linear accessiblerecording medium; a third step of performing error correcting processingon the divided data reproduced in the second step based on theerror-correcting-code data reproduced in the second step, wherein thethird step includes a multiplying step of multiplying and outputting thedivided data on which the error-correcting processing has beenperformed; and a fourth step of performing restoring processing on thedivided data which cannot be recorded on the first recording medium inthe first step and needs to be restored and recorded thereon through:reproducing the divided data and the error-correcting-code datacorresponding to the divided data, which are recorded on the firstrecording medium and the second recording medium respectively, exceptthe divided data to be restored, from the first recording medium and thesecond recording medium; performing error-correcting processing on atleast the divided data to be restored based on the reproduced divideddata and the error-correcting-code data which have been reproduced; andre-recording the divided data to be restored on which theerror-correcting processing has been performed on the first recordingmedium.
 18. A method of recording and reproducing data according toclaim 17, wherein in the first step the divided data is recorded on therespective first non-linear accessible recording media, while theerror-correcting-code data is recorded on the respective secondnon-linear accessible recording media.
 19. A method of recording andreproducing data according to claim 17, wherein theerror-correcting-code data is Read-Solomon-code data.
 20. A method ofrecording and reproducing data according to claim 17, wherein the firstand the second non-linear accessible recording media are hard disks. 21.A method of recording and reproducing data according to claim 17,wherein the restoring processing as in the fourth step is performed onpart of the recording region of the first recording medium.
 22. A methodof recording and reproducing data according to claim 17, wherein therestoring processing as in the fourth step is performed on the wholerecording region of the first recording medium.
 23. A method ofrecording and reproducing data according to claim 17, wherein therestoring processing as in the fourth step is performed if any of thedivided data is not recorded on the first recording medium or any of thedivided data recorded in the first recording medium is not reproduced.24. A method of recording and reproducing data according to claim 17,wherein the restoring processing as in the fourth step is performed ifany of the divided data is not recorded on the first recording medium orany of the divided data recorded on the first recording medium is notreproduced, while the first recording medium to be restored is excludedfrom the divided data to be reproduced until the restoring processing iscompleted on the whole recording region of the first recording medium.25. A data recording and reproducing apparatus comprising: means forrecording and reproducing divided data for recording a plurality ofdivided data obtained through dividing input data by a predeterminedunit on a plurality of first non-linear accessible recording media,respectively, while reproducing the divided data recorded on the firstrecording media; means for recording and reproducingerror-correcting-code data for generating a plurality oferror-correcting-code data for the divided data to record theerror-correcting-code data on a second non-linear accessible recordingmedium, while reproducing the error-correcting-code data recorded on thesecond recording medium; and means for controlling re-allottingprocessing for controlling the means for recording and reproducingdivided data to exclude the first recording medium subject tore-allotting processing, in which the correspondence between logicaladdress and physical address in the recording region of the firstrecording media is changed, from other first recording media on whichrecording and reproducing are performed by the means for recording andreproducing divided data, and to perform the re-allotting processing.26. A data recording and reproducing apparatus according to claim 25further comprising: means for generating divided data for generating thedivided data by dividing the input data by a predetermined unit; meansfor generating error-correcting-code data for generating theerror-correcting-code data based on the divided data generated in themeans for generating divided data; means for processing error-correctingfor performing error-correcting processing on the divided datareproduced from the means for recording and reproducing divided datausing the error-correcting-code data reproduced in the means forrecording and reproducing error-correcting-code data; and multiplyingmeans for multiplying and outputting the divided data outputting fromthe means for processing error-correcting.
 27. A data recording andreproducing apparatus according to claim 26, wherein the means forprocessing error-correcting performs error-correcting to restore thedivided data which cannot be obtained from the divided data reproducedfrom another means for recording and reproducing divided data and theerror-correcting-code data reproduced from the means for recording andreproducing error-correcting-code data, if the divided data to bereproduced from the means for recording and reproducing divided datacannot be obtained.
 28. A data recording and reproducing apparatusaccording to claim 25, wherein the means for recording and reproducingerror-correcting-code data records the error-correcting code on therespective second recording media.
 29. A data recording and reproducingapparatus according to claim 25, wherein the error-correcting-code datais Read-Solomon code data.
 30. A data recording and reproducingapparatus according to claim 25, wherein the first and the secondnon-linear accessible recording media are hard disks.
 31. A datarecording and reproducing apparatus according to claim 25 furthercomprising: means for processing error-correcting for performingerror-correcting processing on the divided data reproduced from themeans for recording and reproducing divided data using theerror-correcting-code data reproduced in the means for recording andreproducing error-correcting-code data; and means for controllingdata-restoring processing for performing restoring processing on divideddata through: controlling the means for recording and reproducingdivided data and the means for recording and reproducingerror-correcting-code data to reproduce the divided data and theerror-correcting-code data corresponding to the divided data, which arerecorded on the first recording media and the second recording mediumrespectively, except the divided data to be restored, from the firstrecording media and the second recording medium; controlling the meansfor processing error-connecting to perform error-correcting processingon the divided data based on the divided data and theerror-correcting-code data which have been reproduced; and controllingthe means for recording and reproducing divided data to record thedivided data to be restored on which the error-correcting processing hasbeen performed, on the first recording medium.
 32. A data recording andreproducing apparatus according to claim 31, wherein the means forcontrolling data-restoring processing performs restoring processing onthe divided data if recording or reproducing the divided data on/fromthe first recording media is not performed.
 33. An AV server comprising:a plurality of input/output processing means for converting dataincluding visual and audio data inputted from outside to data which canbe recorded on a non-linear accessible recording medium, whileoutputting the data outputted from the recording medium after convertingthe data to data which can be outputted outside; means for recording andreproducing divided data for recording a plurality of divided dataobtained through dividing data outputted from each of the input/outputprocessing means on a first non-linear accessible recording medium,while reproducing the divided data recorded on the first non-linearaccessible recording medium; means for recording and reproducingerror-correcting-code data for generating the error-correcting-code datafor the divided data to record the error-correcting-code data on asecond non-linear accessible recording medium, while reproducing theerror-correcting-code data recorded on the second non-linear accessiblerecording medium; and means for controlling re-allotting processing forcontrolling the means for recording and reproducing divided data toexclude the first recording medium subject to re allotting processing,in which the correspondence between logical address and physical addressin the recording region of the first recording medium is changed fromother first recording media on which recording and reproducing areperformed by the means for recording and reproducing divided data, andto perform the re-allotting processing.
 34. A method of recording andreproducing data including: a first step of recording a plurality ofdivided data obtained through dividing input data by a predeterminedunit on a first non-linear accessible recording medium, while generatinga plurality of error-correcting-code data for the divided data to recordthe error-correcting-code data on a second non-linear accessiblerecording medium; a second step of reproducing the divided data recordedon the first non-linear accessible recording medium in the first step,while reproducing the error-correcting-code data recorded on the secondnon-linear accessible recording medium; and a third step of excludingthe first recording medium subject to re-allotting processing, in whichthe correspondence between the logical address and physical address inthe recording region of the first recording medium is changed, fromother first recording media on which recording and reproducing areperformed by the means for recording and reproducing divided data in thefirst and second steps, and of performing re-allotting processing.
 35. Amethod of recording and reproducing data according to claim 34 furtherincluding a fourth step of: performing error-correcting processing onthe divided data reproduced in the second step based on theerror-correcting-code data reproduced in the second step.
 36. A methodof recording and reproducing data according to claim 35 furtherincluding a fifth step of: multiplying and outputting the divided data,the divided data being outputted in the fourth step and inputted.
 37. Amethod of recording and reproducing data according to claim 34, whereinin the first step the divided data is recorded on the respective firstrecording media, while the error-correcting-code data is recorded on therespective second recording media.
 38. A method of recording andreproducing data according to claim 34, wherein theerror-correcting-code data is Read-Solomon code data.
 39. A method ofrecording and reproducing data according to claim 34, wherein the firstand the second non-linear accessible recording media are hard disks. 40.A method of recording and reproducing data according to claim 34 furtherincluding a restoring-processing step of: performingrestoring-processing on the divided data through: reproducing thedivided data and the error-correcting-code data corresponding to thedivided data, which are recorded on the first and the second recordingmedia respectively, except the divided data to be restored from thefirst recording medium and the second recording medium; performingerror-correcting processing on at least the divided data to be restoredbased on the reproduced divided data and the error-correcting-code datawhich have been reproduced; and recording the divided data to berestored on which the error-correcting processing has been performed, onthe first recording medium.
 41. A method of recording and reproducingdata according to claim 40, wherein the restoring processing isperformed if the divided data is not recorded on the first recordingmedium or the divided data recorded on the first recording medium is notreproduced.